<template>
	<view class="flex-col page">
		<view class="flex-col group_1">
			<view class="flex-col group_2">
				<view class="flex-row">
					<image :src="imgUrl+'16557836458052103381.png'" class="image_2" />
					<text class="text_1">账号注销</text>
				</view>
				<text class="text_2">永久注销且无法恢复，请谨慎操作</text>
			</view>
			<text class="text_3">请选择注销账号的原因：</text>
			<view class="flex-row group_4">
				<u-radio-group v-model="radiovalue1" placement="column" @change="groupChange" size="15">
					<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index" iconSize="35"
						:label="item.value" :name="item.name" @change="radioChange" size="50" labelSize="30">
					</u-radio>
				</u-radio-group>
			</view>
			<view class="flex-col items-start text-wrapper"><text class="text_7">请填写注销原因：</text></view>
			<view class="flex-col items-start text-wrapper_1"><input type="text" class="text_8" v-model="reason" placeholder="请输入~"></view>
			<view class="flex-col items-center button" @click="submits"><text
					class="text_9">下一步</text></view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				imgUrl:this.$IMG_URL,
				radiovalue1:'',
				reason:'',
				// 基本案列数据
				radiolist1: [{
						name: '1',
						value:  '多账号，释放手机号',
						disabled: false
					},
					{
						name: '2',
						value: '不想使用了',
						disabled: false
					},
					{
						name: '3',
						value: '其他',
						disabled: false
					},
				],
				// u-radio-group的v-model绑定的值如果设置为某个radio的name，就会被默认选中
				
			};
		},
		methods: {
			 groupChange(n) {
				console.log('groupChange', n);
			  },
			  radioChange(n) {
				console.log('radioChange', n);
			  },
			submits(){
				if(this.radiovalue1=='')
				{
					this.$u.toast('请选择注销原因');
					return ;
				}
				if(this.reason=='')
				{
					this.$u.toast('请填写注销原因');
					return ;
				}
				
				uni.setStorageSync('logoutType', this.radiovalue1);
				uni.setStorageSync('reason', this.reason);
				uni.redirectTo({
					url: '/pages/my/setting/security/layout3',
				});
			}
		},
	};
</script>

<style scoped lang="scss">
	.image_3 {
		margin-top: 4rpx;
		width: 36rpx;
		height: 36rpx;
	}

	.page {
		background-color: #ffffffff;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;
	}

	.group_1 {
		padding: 0 32rpx 64rpx;
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.group_2 {
		padding: 32rpx 0 41rpx;
		border-bottom: solid 1rpx #ededed;
	}

	.text_3 {
		margin-top: 29rpx;
		font-weight: 800;
		align-self: flex-start;
		color: #333333;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.group_4 {
		margin-top: 40rpx;
	}

	.group_5 {
		margin-top: 40rpx;
	}

	.group_6 {
		margin-top: 40rpx;
	}

	.text-wrapper {
		margin-top: 41rpx;
		padding-top: 30rpx;
		height: 68rpx;
		border-top: solid 1rpx #ededed;
	}

	.text-wrapper_1 {
		margin-top: 46rpx;
		padding-bottom: 35rpx;
		border-bottom: solid 1rpx #ededed;
	}

	.button {
		position: fixed;
		bottom: 60rpx;
		left: 0;
		right:0;
		width: 650rpx;
		margin: 0 auto;
		padding: 25rpx 0 ;
		background-color: #1d6aff;
		border-radius: 44rpx;
	}

	.text_2 {
		margin-top: 34rpx;
		align-self: flex-start;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_4 {
		margin-left: 20rpx;
		margin-bottom: 7rpx;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_5 {
		margin-left: 20rpx;
		margin-bottom: 7rpx;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_6 {
		margin-left: 20rpx;
		margin-bottom: 7rpx;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_7 {
		font-weight: 800;
		color: #333333;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.text_8 {
		color: #999999;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_9 {
		color: #ffffff;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.image_2 {
		margin-top: 8rpx;
		width: 34rpx;
		height: 36rpx;
	}

	.text_1 {
		margin-left: 16rpx;
		margin-bottom: 6rpx;
		color: #333333;
		font-weight: 800;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
		letter-spacing: 1.28rpx;
	}
</style>
